const { ref } = Vue
export default {
    setup() {
        let ping = ref(["差评", "较差", "中等", "一般", "好评"])
        let zi = ref(['专业水平高', '交付准时', '效果明显', '数据分析准确', '能力待提高', '工期延误'])
        let xing = ref([
            { src: "img/x1.png", src2: "img/x2.png", checked: false },
            { src: "img/x1.png", src2: "img/x2.png", checked: false },
            { src: "img/x1.png", src2: "img/x2.png", checked: false },
            { src: "img/x1.png", src2: "img/x2.png", checked: false },
            { src: "img/x1.png", src2: "img/x2.png", checked: false }])
        let pinga = ref(-1)
        let flag = ref([false, false, false, false, false, false])
        let legt = ref('')
        let dmlei = ref(false)
        function deleitime() {
            dmlei.value = !dmlei.value
            setTimeout(() => {
                dmlei.value = !dmlei.value
            }, 3000)
        }
        const hoverStar = (index, isChecked) => {
            xing.value[index].checked = isChecked
            for (let i = 0; i < index; i++) {
                xing.value[i].checked = isChecked
            }
            pinga.value = isChecked ? index : -1
        }

        return {
            ping, xing, hoverStar, pinga, flag, zi, legt, dmlei, deleitime
        }
    },
    template: '#orde'
}